package team.damo.admin.controller;

import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import team.damo.admin.model.Test;
import team.damo.admin.service.TestService;
import team.damo.common.enums.ResponseCode;
import team.damo.common.utils.ResponseEntity;

import java.util.Deque;
import java.util.LinkedList;
import java.util.List;

/**
 * @Author: ZhangHeng
 * @Description: TODO
 * @DateTime: 2024/2/18 上午9:12
 **/
@RestController
@Log4j
public class TestController {
    @Autowired
    public TestService testService;

    @ApiOperation(value = "测试")
    @PostMapping(value = "/test")
    public ResponseEntity Test(){
        log.info("测试请求开始:");
        List<Test> testList = testService.getList();
        List<Test> testList2 = testService.getListById(1);
        log.info("获取的数据:" + testList);
        return ResponseEntity.ok();
    }
}
